Mapping functions are used to apply two-dimensional textures to surfaces. Each mapping functions defines a different method of transforming a three dimensional point of intersection to a two dimensional u - v pair termed texturing coordinates. Typically, the arguments to a mapping method define a center of a projection and two non-parallel axes that define a local coordinate system.
The default mapping method is termed u - v mapping or inverse mapping. Normally, there is a different inverse mapping method for each primitive type (see chapter 5). When inverse mapping is used, the point of intersection is passed to the uv method for the primitive that was hit.
The inverse mapping method for each primitive is described in Chapter 5.
See the description of the inverse mapping method for the
cylinder in Chapter 5. By default, the point of intersection is
projected onto a cylinder that runs through the origin along the z
axis, with uaxis equal to the x axis.
By default, a spherical mapping projects points towards the origin,
with vaxis defined to be the z axis and
uaxis defined to be the x axis.